\(\int \frac {\csc ^6(x)}{a+b \cot (x)} \, dx\) [12]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 81 \[ \int \frac {\csc ^6(x)}{a+b \cot (x)} \, dx=\frac {a \left (a^2+2 b^2\right ) \cot (x)}{b^4}-\frac {\left (a^2+2 b^2\right ) \cot ^2(x)}{2 b^3}+\frac {a \cot ^3(x)}{3 b^2}-\frac {\cot ^4(x)}{4 b}-\frac {\left (a^2+b^2\right )^2 \log (a+b \cot (x))}{b^5} \]

[Out]

a*(a^2+2*b^2)*cot(x)/b^4-1/2*(a^2+2*b^2)*cot(x)^2/b^3+1/3*a*cot(x)^3/b^2-1/4*cot(x)^4/b-(a^2+b^2)^2*ln(a+b*cot
(x))/b^5

Rubi [A] (verified)

Time = 0.13 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3587, 711} \[ \int \frac {\csc ^6(x)}{a+b \cot (x)} \, dx=-\frac {\left (a^2+b^2\right )^2 \log (a+b \cot (x))}{b^5}+\frac {a \left (a^2+2 b^2\right ) \cot (x)}{b^4}-\frac {\left (a^2+2 b^2\right ) \cot ^2(x)}{2 b^3}+\frac {a \cot ^3(x)}{3 b^2}-\frac {\cot ^4(x)}{4 b} \]

[In]

Int[Csc[x]^6/(a + b*Cot[x]),x]

[Out]

(a*(a^2 + 2*b^2)*Cot[x])/b^4 - ((a^2 + 2*b^2)*Cot[x]^2)/(2*b^3) + (a*Cot[x]^3)/(3*b^2) - Cot[x]^4/(4*b) - ((a^
2 + b^2)^2*Log[a + b*Cot[x]])/b^5

Rule 711

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rule 3587

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(b*f), Subst
[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b
^2, 0] && IntegerQ[m/2]

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\left (1+\frac {x^2}{b^2}\right )^2}{a+x} \, dx,x,b \cot (x)\right )}{b} \\ & = -\frac {\text {Subst}\left (\int \left (\frac {a \left (-a^2-2 b^2\right )}{b^4}+\frac {\left (a^2+2 b^2\right ) x}{b^4}-\frac {a x^2}{b^4}+\frac {x^3}{b^4}+\frac {\left (a^2+b^2\right )^2}{b^4 (a+x)}\right ) \, dx,x,b \cot (x)\right )}{b} \\ & = \frac {a \left (a^2+2 b^2\right ) \cot (x)}{b^4}-\frac {\left (a^2+2 b^2\right ) \cot ^2(x)}{2 b^3}+\frac {a \cot ^3(x)}{3 b^2}-\frac {\cot ^4(x)}{4 b}-\frac {\left (a^2+b^2\right )^2 \log (a+b \cot (x))}{b^5} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.77 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.05 \[ \int \frac {\csc ^6(x)}{a+b \cot (x)} \, dx=\frac {-6 b^2 \left (a^2+b^2\right ) \csc ^2(x)-3 b^4 \csc ^4(x)+4 a b \cot (x) \left (3 a^2+5 b^2+b^2 \csc ^2(x)\right )+12 \left (a^2+b^2\right )^2 (\log (\sin (x))-\log (b \cos (x)+a \sin (x)))}{12 b^5} \]

[In]

Integrate[Csc[x]^6/(a + b*Cot[x]),x]

[Out]

(-6*b^2*(a^2 + b^2)*Csc[x]^2 - 3*b^4*Csc[x]^4 + 4*a*b*Cot[x]*(3*a^2 + 5*b^2 + b^2*Csc[x]^2) + 12*(a^2 + b^2)^2
*(Log[Sin[x]] - Log[b*Cos[x] + a*Sin[x]]))/(12*b^5)

Maple [A] (verified)

Time = 2.68 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.31

method result size
default \(-\frac {1}{4 b \tan \left (x \right )^{4}}-\frac {a^{2}+2 b^{2}}{2 b^{3} \tan \left (x \right )^{2}}+\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (x \right )\right )}{b^{5}}+\frac {a}{3 b^{2} \tan \left (x \right )^{3}}+\frac {\left (a^{2}+2 b^{2}\right ) a}{b^{4} \tan \left (x \right )}-\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (x \right ) a +b \right )}{b^{5}}\) \(106\)
risch \(\frac {2 i a^{3} {\mathrm e}^{6 i x}+2 i a \,b^{2} {\mathrm e}^{6 i x}+2 a^{2} b \,{\mathrm e}^{6 i x}+2 b^{3} {\mathrm e}^{6 i x}-6 i a^{3} {\mathrm e}^{4 i x}-10 i a \,b^{2} {\mathrm e}^{4 i x}-4 a^{2} b \,{\mathrm e}^{4 i x}-8 b^{3} {\mathrm e}^{4 i x}+6 i a^{3} {\mathrm e}^{2 i x}+\frac {34 i a \,b^{2} {\mathrm e}^{2 i x}}{3}+2 a^{2} b \,{\mathrm e}^{2 i x}+2 b^{3} {\mathrm e}^{2 i x}-2 i a^{3}-\frac {10 i a \,b^{2}}{3}}{b^{4} \left ({\mathrm e}^{2 i x}-1\right )^{4}}+\frac {\ln \left ({\mathrm e}^{2 i x}-1\right ) a^{4}}{b^{5}}+\frac {2 \ln \left ({\mathrm e}^{2 i x}-1\right ) a^{2}}{b^{3}}+\frac {\ln \left ({\mathrm e}^{2 i x}-1\right )}{b}-\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {i b -a}{i b +a}\right ) a^{4}}{b^{5}}-\frac {2 \ln \left ({\mathrm e}^{2 i x}+\frac {i b -a}{i b +a}\right ) a^{2}}{b^{3}}-\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {i b -a}{i b +a}\right )}{b}\) \(298\)

[In]

int(csc(x)^6/(a+b*cot(x)),x,method=_RETURNVERBOSE)

[Out]

-1/4/b/tan(x)^4-1/2*(a^2+2*b^2)/b^3/tan(x)^2+(a^4+2*a^2*b^2+b^4)/b^5*ln(tan(x))+1/3/b^2*a/tan(x)^3+(a^2+2*b^2)
/b^4*a/tan(x)-(a^4+2*a^2*b^2+b^4)/b^5*ln(tan(x)*a+b)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 248 vs. \(2 (75) = 150\).

Time = 0.30 (sec) , antiderivative size = 248, normalized size of antiderivative = 3.06 \[ \int \frac {\csc ^6(x)}{a+b \cot (x)} \, dx=-\frac {6 \, a^{2} b^{2} + 9 \, b^{4} - 6 \, {\left (a^{2} b^{2} + b^{4}\right )} \cos \left (x\right )^{2} + 6 \, {\left ({\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (x\right )^{4} + a^{4} + 2 \, a^{2} b^{2} + b^{4} - 2 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (x\right )^{2}\right )} \log \left (2 \, a b \cos \left (x\right ) \sin \left (x\right ) - {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + a^{2}\right ) - 6 \, {\left ({\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (x\right )^{4} + a^{4} + 2 \, a^{2} b^{2} + b^{4} - 2 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (x\right )^{2}\right )} \log \left (-\frac {1}{4} \, \cos \left (x\right )^{2} + \frac {1}{4}\right ) + 4 \, {\left ({\left (3 \, a^{3} b + 5 \, a b^{3}\right )} \cos \left (x\right )^{3} - 3 \, {\left (a^{3} b + 2 \, a b^{3}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{12 \, {\left (b^{5} \cos \left (x\right )^{4} - 2 \, b^{5} \cos \left (x\right )^{2} + b^{5}\right )}} \]

[In]

integrate(csc(x)^6/(a+b*cot(x)),x, algorithm="fricas")

[Out]

-1/12*(6*a^2*b^2 + 9*b^4 - 6*(a^2*b^2 + b^4)*cos(x)^2 + 6*((a^4 + 2*a^2*b^2 + b^4)*cos(x)^4 + a^4 + 2*a^2*b^2
+ b^4 - 2*(a^4 + 2*a^2*b^2 + b^4)*cos(x)^2)*log(2*a*b*cos(x)*sin(x) - (a^2 - b^2)*cos(x)^2 + a^2) - 6*((a^4 +
2*a^2*b^2 + b^4)*cos(x)^4 + a^4 + 2*a^2*b^2 + b^4 - 2*(a^4 + 2*a^2*b^2 + b^4)*cos(x)^2)*log(-1/4*cos(x)^2 + 1/
4) + 4*((3*a^3*b + 5*a*b^3)*cos(x)^3 - 3*(a^3*b + 2*a*b^3)*cos(x))*sin(x))/(b^5*cos(x)^4 - 2*b^5*cos(x)^2 + b^
5)

Sympy [F(-1)]

Timed out. \[ \int \frac {\csc ^6(x)}{a+b \cot (x)} \, dx=\text {Timed out} \]

[In]

integrate(csc(x)**6/(a+b*cot(x)),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.31 \[ \int \frac {\csc ^6(x)}{a+b \cot (x)} \, dx=-\frac {{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (a \tan \left (x\right ) + b\right )}{b^{5}} + \frac {{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (\tan \left (x\right )\right )}{b^{5}} + \frac {4 \, a b^{2} \tan \left (x\right ) + 12 \, {\left (a^{3} + 2 \, a b^{2}\right )} \tan \left (x\right )^{3} - 3 \, b^{3} - 6 \, {\left (a^{2} b + 2 \, b^{3}\right )} \tan \left (x\right )^{2}}{12 \, b^{4} \tan \left (x\right )^{4}} \]

[In]

integrate(csc(x)^6/(a+b*cot(x)),x, algorithm="maxima")

[Out]

-(a^4 + 2*a^2*b^2 + b^4)*log(a*tan(x) + b)/b^5 + (a^4 + 2*a^2*b^2 + b^4)*log(tan(x))/b^5 + 1/12*(4*a*b^2*tan(x
) + 12*(a^3 + 2*a*b^2)*tan(x)^3 - 3*b^3 - 6*(a^2*b + 2*b^3)*tan(x)^2)/(b^4*tan(x)^4)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 151 vs. \(2 (75) = 150\).

Time = 0.27 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.86 \[ \int \frac {\csc ^6(x)}{a+b \cot (x)} \, dx=\frac {{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | \tan \left (x\right ) \right |}\right )}{b^{5}} - \frac {{\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} \log \left ({\left | a \tan \left (x\right ) + b \right |}\right )}{a b^{5}} - \frac {25 \, a^{4} \tan \left (x\right )^{4} + 50 \, a^{2} b^{2} \tan \left (x\right )^{4} + 25 \, b^{4} \tan \left (x\right )^{4} - 12 \, a^{3} b \tan \left (x\right )^{3} - 24 \, a b^{3} \tan \left (x\right )^{3} + 6 \, a^{2} b^{2} \tan \left (x\right )^{2} + 12 \, b^{4} \tan \left (x\right )^{2} - 4 \, a b^{3} \tan \left (x\right ) + 3 \, b^{4}}{12 \, b^{5} \tan \left (x\right )^{4}} \]

[In]

integrate(csc(x)^6/(a+b*cot(x)),x, algorithm="giac")

[Out]

(a^4 + 2*a^2*b^2 + b^4)*log(abs(tan(x)))/b^5 - (a^5 + 2*a^3*b^2 + a*b^4)*log(abs(a*tan(x) + b))/(a*b^5) - 1/12
*(25*a^4*tan(x)^4 + 50*a^2*b^2*tan(x)^4 + 25*b^4*tan(x)^4 - 12*a^3*b*tan(x)^3 - 24*a*b^3*tan(x)^3 + 6*a^2*b^2*
tan(x)^2 + 12*b^4*tan(x)^2 - 4*a*b^3*tan(x) + 3*b^4)/(b^5*tan(x)^4)

Mupad [B] (verification not implemented)

Time = 12.95 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.36 \[ \int \frac {\csc ^6(x)}{a+b \cot (x)} \, dx=-\frac {\frac {1}{4\,b}-\frac {a\,\mathrm {tan}\left (x\right )}{3\,b^2}+\frac {{\mathrm {tan}\left (x\right )}^2\,\left (a^2+2\,b^2\right )}{2\,b^3}-\frac {a\,{\mathrm {tan}\left (x\right )}^3\,\left (a^2+2\,b^2\right )}{b^4}}{{\mathrm {tan}\left (x\right )}^4}-\frac {2\,\mathrm {atanh}\left (\frac {\left (b+2\,a\,\mathrm {tan}\left (x\right )\right )\,{\left (a^2+b^2\right )}^2}{b\,\left (a^4+2\,a^2\,b^2+b^4\right )}\right )\,{\left (a^2+b^2\right )}^2}{b^5} \]

[In]

int(1/(sin(x)^6*(a + b*cot(x))),x)

[Out]

- (1/(4*b) - (a*tan(x))/(3*b^2) + (tan(x)^2*(a^2 + 2*b^2))/(2*b^3) - (a*tan(x)^3*(a^2 + 2*b^2))/b^4)/tan(x)^4
- (2*atanh(((b + 2*a*tan(x))*(a^2 + b^2)^2)/(b*(a^4 + b^4 + 2*a^2*b^2)))*(a^2 + b^2)^2)/b^5